//var wxid = '{$wxid}';
function wxConfig(jssdk){
		wx.config({
		    debug: false, 
		    appId: jssdk.appId,
				timestamp: jssdk.timestamp,
				nonceStr: jssdk.nonceStr,
				signature: jssdk.signature,
		    jsApiList: [
		      // 所有要调用的 API 都要加到这个列表中
		      'chooseImage',
				'previewImage',
				'uploadImage',
				'downloadImage',
				 'onMenuShareTimeline',
				 'onMenuShareAppMessage'
		    ]
		  });
		
		  wx.ready(function () {
		  	
		wx.onMenuShareTimeline({
		
				title: '好友邀请你 寻找克拉恋人',
				link:'http://bgy2.lly360.com/html/picture2/index.html#/?a=1',
			 imgUrl: 'http://bgy2.lly360.com/ws/Mobile/Webroot/default/images/chengyi/share.png',
			  trigger: function (res) {
			   
			  },
			  success: function (res) {
			   			
						
			  },
			  cancel: function (res) {
			   
			  },
			  fail: function (res) {
			    alert(JSON.stringify(res));
			  }
			});
			
			wx.onMenuShareAppMessage({
				link:'http://bgy2.lly360.com/html/picture2/index.html#/?a=1',
			title: '好友邀请你 寻找克拉恋人',
			desc: '测测你们的夫妻相指数。100分克拉恋人即可获得由碧桂园珊瑚宫殿提供的钻戒一对。',
			imgUrl: 'http://bgy2.lly360.com/ws/Mobile/Webroot/default/images/chengyi/share.png',
			success: function () {
				
			},
			cancel: function () { 
			    // 用户取消分享后执行的回调函数
			}
			});

			
		});
}
function wxShareConfig(jssdk,wxid){
	wx.config({
	    debug: false, 
	    appId: jssdk.appId,
			timestamp: jssdk.timestamp,
			nonceStr: jssdk.nonceStr,
			signature: jssdk.signature,
	    jsApiList: [
	      // 所有要调用的 API 都要加到这个列表中
	      'chooseImage',
			'previewImage',
			'uploadImage',
			'downloadImage',
	      'onMenuShareTimeline',
	      'onMenuShareAppMessage',
	    
	    ]
	  });
	
	  wx.ready(function () {
	  	
	wx.onMenuShareTimeline({
	
		title: '测测你和TA的夫妻相指数，找到属于你的克拉恋人',
		  link:'http://bgy2.lly360.com/html/picture2/index.html#/share/'+wxid+"?a=1",
		 imgUrl: 'http://bgy2.lly360.com/ws/Mobile/Webroot/default/images/chengyi/share.png',
		  trigger: function (res) {
		   
		  },
		  success: function (res) {
		   			
					
		  },
		  cancel: function (res) {
		   
		  },
		  fail: function (res) {
		    alert(JSON.stringify(res));
		  }
		});
		
		wx.onMenuShareAppMessage({
		link:'http://bgy2.lly360.com/html/picture2/index.html#/share/'+wxid+"?a=1",
		title: '测测你和TA的夫妻相指数，找到属于你的克拉恋人',
		desc: '测测你们的夫妻相指数。100分克拉恋人即可获得由碧桂园珊瑚宫殿提供的钻戒一对。',
		imgUrl: 'http://bgy2.lly360.com/ws/Mobile/Webroot/default/images/chengyi/share.png',
		success: function () { 
		
					
					
		},
		cancel: function () { 
		    // 用户取消分享后执行的回调函数
		}
		});
	
	});
}
